from mqttdemo.mqtt2.mqtt import MqttPublisher

publisher = MqttPublisher("localhost", client_id="PublisherClient")
publisher.connect()
publisher.publish("test/topic", "Hello from publisher!")
publisher.disconnect()
